<form name="$ctrl.create"
      ng-submit="$ctrl.create.$valid && $ctrl.onSubmit()"
      w-i18n-ns="app.ui"
      novalidate>

    <div class="left body-2 margin-05">
        <span w-i18n="password.name"></span>
    </div>
    <w-input-container class="margin-3">
        <w-input w-autofocus
                 class="big no-validate no-icon"
                 type="text"
                 maxlength="20"
                 ng-model="$ctrl.name"></w-input>
    </w-input-container>

    <div class="left body-2 margin-05">
        <span w-i18n="password.title"></span>
    </div>
    <w-input-container>
        <w-show-hide-password>
            <w-input
                name="password"
                type="password"
                class="big no-validate no-icon"
                ng-model="$ctrl.password"
                minlength="8"
                required>
            </w-input>
        </w-show-hide-password>
        <w-complexity-meter field="password">
            <complexity-message message="minlength, required">
                <span w-i18n="password.minLength" params="::{minLength: 8}" class="footnote-1"></span>
            </complexity-message>
            <complexity-message type="warn">
                <span w-i18n="password.warn" class="footnote-1"></span>
            </complexity-message>
            <complexity-message type="success">
                <span w-i18n="password.secure" class="footnote-1"></span>
            </complexity-message>
        </w-complexity-meter>
    </w-input-container>

    <w-input-container class="margin-3">
        <div class="left body-2 margin-05">
            <span w-i18n="password.repeat"></span>
        </div>
        <w-show-hide-password>
            <w-input
                type="password"
                class="no-icon big"
                name="confirm"
                required
                w-validate
                w-validator-compare="password"
                ng-model="$ctrl.confirmPassword">
            </w-input>
        </w-show-hide-password>
    </w-input-container>

    <w-button disabled="$ctrl.create.$invalid"
              class="submit long big">
        <div class="full-width" ng-transclude></div>
    </w-button>
</form>
